
/*

  KLayout Layout Viewer
  Copyright (C) 2006-2025 Matthias Koefferlein

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

/**
*  @file gsiDeclQModelIndex.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

#include <QModelIndex>
#include <QAbstractItemModel>
#include <QModelRoleDataSpan>
#include "gsiQt.h"
#include "gsiQtCoreCommon.h"
#include <memory>

// -----------------------------------------------------------------------
// class QModelIndex
  static bool QModelIndex_operator_eq(const QModelIndex *a, const QModelIndex &b) {
    return *a == b;
  }
  static bool QModelIndex_operator_ne(const QModelIndex *a, const QModelIndex &b) {
    return !(*a == b);
  }
  static bool QModelIndex_operator_lt(const QModelIndex *a, const QModelIndex &b) {
    return *a < b;
  }

//  Constructor QModelIndex::QModelIndex()


static void _init_ctor_QModelIndex_0 (qt_gsi::GenericStaticMethod *decl)
{
  decl->set_return_new<QModelIndex> ();
}

static void _call_ctor_QModelIndex_0 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QModelIndex *> (new QModelIndex ());
}


// int QModelIndex::column()


static void _init_f_column_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<int > ();
}

static void _call_f_column_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<int > ((int)((QModelIndex *)cls)->column ());
}


// const void *QModelIndex::constInternalPointer()


static void _init_f_constInternalPointer_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<const void * > ();
}

static void _call_f_constInternalPointer_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<const void * > ((const void *)((QModelIndex *)cls)->constInternalPointer ());
}


// QVariant QModelIndex::data(int role)


static void _init_f_data_c767 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("role", true, "Qt::DisplayRole");
  decl->add_arg<int > (argspec_0);
  decl->set_return<QVariant > ();
}

static void _call_f_data_c767 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  int arg1 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (Qt::DisplayRole, heap);
  ret.write<QVariant > ((QVariant)((QModelIndex *)cls)->data (arg1));
}


// QFlags<Qt::ItemFlag> QModelIndex::flags()


static void _init_f_flags_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QFlags<Qt::ItemFlag> > ();
}

static void _call_f_flags_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QFlags<Qt::ItemFlag> > ((QFlags<Qt::ItemFlag>)((QModelIndex *)cls)->flags ());
}


// quintptr QModelIndex::internalId()


static void _init_f_internalId_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<quintptr > ();
}

static void _call_f_internalId_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<quintptr > ((quintptr)((QModelIndex *)cls)->internalId ());
}


// void *QModelIndex::internalPointer()


static void _init_f_internalPointer_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<void * > ();
}

static void _call_f_internalPointer_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<void * > ((void *)((QModelIndex *)cls)->internalPointer ());
}


// bool QModelIndex::isValid()


static void _init_f_isValid_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<bool > ();
}

static void _call_f_isValid_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<bool > ((bool)((QModelIndex *)cls)->isValid ());
}


// const QAbstractItemModel *QModelIndex::model()


static void _init_f_model_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<const QAbstractItemModel * > ();
}

static void _call_f_model_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<const QAbstractItemModel * > ((const QAbstractItemModel *)((QModelIndex *)cls)->model ());
}


// void QModelIndex::multiData(QModelRoleDataSpan roleDataSpan)


static void _init_f_multiData_c2196 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("roleDataSpan");
  decl->add_arg<QModelRoleDataSpan > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_multiData_c2196 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  QModelRoleDataSpan arg1 = gsi::arg_reader<QModelRoleDataSpan >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QModelIndex *)cls)->multiData (arg1);
}


// QModelIndex QModelIndex::parent()


static void _init_f_parent_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QModelIndex > ();
}

static void _call_f_parent_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QModelIndex > ((QModelIndex)((QModelIndex *)cls)->parent ());
}


// int QModelIndex::row()


static void _init_f_row_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<int > ();
}

static void _call_f_row_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<int > ((int)((QModelIndex *)cls)->row ());
}


// QModelIndex QModelIndex::sibling(int row, int column)


static void _init_f_sibling_c1426 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("row");
  decl->add_arg<int > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("column");
  decl->add_arg<int > (argspec_1);
  decl->set_return<QModelIndex > ();
}

static void _call_f_sibling_c1426 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  int arg1 = gsi::arg_reader<int >() (args, heap);
  int arg2 = gsi::arg_reader<int >() (args, heap);
  ret.write<QModelIndex > ((QModelIndex)((QModelIndex *)cls)->sibling (arg1, arg2));
}


// QModelIndex QModelIndex::siblingAtColumn(int column)


static void _init_f_siblingAtColumn_c767 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("column");
  decl->add_arg<int > (argspec_0);
  decl->set_return<QModelIndex > ();
}

static void _call_f_siblingAtColumn_c767 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  int arg1 = gsi::arg_reader<int >() (args, heap);
  ret.write<QModelIndex > ((QModelIndex)((QModelIndex *)cls)->siblingAtColumn (arg1));
}


// QModelIndex QModelIndex::siblingAtRow(int row)


static void _init_f_siblingAtRow_c767 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("row");
  decl->add_arg<int > (argspec_0);
  decl->set_return<QModelIndex > ();
}

static void _call_f_siblingAtRow_c767 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  int arg1 = gsi::arg_reader<int >() (args, heap);
  ret.write<QModelIndex > ((QModelIndex)((QModelIndex *)cls)->siblingAtRow (arg1));
}



namespace gsi
{

static gsi::Methods methods_QModelIndex () {
  gsi::Methods methods;
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QModelIndex::QModelIndex()\nThis method creates an object of class QModelIndex.", &_init_ctor_QModelIndex_0, &_call_ctor_QModelIndex_0);
  methods += new qt_gsi::GenericMethod ("column", "@brief Method int QModelIndex::column()\n", true, &_init_f_column_c0, &_call_f_column_c0);
  methods += new qt_gsi::GenericMethod ("constInternalPointer", "@brief Method const void *QModelIndex::constInternalPointer()\n", true, &_init_f_constInternalPointer_c0, &_call_f_constInternalPointer_c0);
  methods += new qt_gsi::GenericMethod ("data", "@brief Method QVariant QModelIndex::data(int role)\n", true, &_init_f_data_c767, &_call_f_data_c767);
  methods += new qt_gsi::GenericMethod ("flags", "@brief Method QFlags<Qt::ItemFlag> QModelIndex::flags()\n", true, &_init_f_flags_c0, &_call_f_flags_c0);
  methods += new qt_gsi::GenericMethod ("internalId", "@brief Method quintptr QModelIndex::internalId()\n", true, &_init_f_internalId_c0, &_call_f_internalId_c0);
  methods += new qt_gsi::GenericMethod ("internalPointer", "@brief Method void *QModelIndex::internalPointer()\n", true, &_init_f_internalPointer_c0, &_call_f_internalPointer_c0);
  methods += new qt_gsi::GenericMethod ("isValid?", "@brief Method bool QModelIndex::isValid()\n", true, &_init_f_isValid_c0, &_call_f_isValid_c0);
  methods += new qt_gsi::GenericMethod ("model", "@brief Method const QAbstractItemModel *QModelIndex::model()\n", true, &_init_f_model_c0, &_call_f_model_c0);
  methods += new qt_gsi::GenericMethod ("multiData", "@brief Method void QModelIndex::multiData(QModelRoleDataSpan roleDataSpan)\n", true, &_init_f_multiData_c2196, &_call_f_multiData_c2196);
  methods += new qt_gsi::GenericMethod ("parent", "@brief Method QModelIndex QModelIndex::parent()\n", true, &_init_f_parent_c0, &_call_f_parent_c0);
  methods += new qt_gsi::GenericMethod ("row", "@brief Method int QModelIndex::row()\n", true, &_init_f_row_c0, &_call_f_row_c0);
  methods += new qt_gsi::GenericMethod ("sibling", "@brief Method QModelIndex QModelIndex::sibling(int row, int column)\n", true, &_init_f_sibling_c1426, &_call_f_sibling_c1426);
  methods += new qt_gsi::GenericMethod ("siblingAtColumn", "@brief Method QModelIndex QModelIndex::siblingAtColumn(int column)\n", true, &_init_f_siblingAtColumn_c767, &_call_f_siblingAtColumn_c767);
  methods += new qt_gsi::GenericMethod ("siblingAtRow", "@brief Method QModelIndex QModelIndex::siblingAtRow(int row)\n", true, &_init_f_siblingAtRow_c767, &_call_f_siblingAtRow_c767);
  return methods;
}

gsi::Class<QModelIndex> decl_QModelIndex ("QtCore", "QModelIndex",
  gsi::method_ext("==", &QModelIndex_operator_eq, gsi::arg ("other"), "@brief Method bool QModelIndex::operator==(const QModelIndex &) const") +
  gsi::method_ext("!=", &QModelIndex_operator_ne, gsi::arg ("other"), "@brief Method bool QModelIndex::operator!=(const QModelIndex &) const") +
  gsi::method_ext("<", &QModelIndex_operator_lt, gsi::arg ("other"), "@brief Method bool QModelIndex::operator<(const QModelIndex &) const") 
+
  methods_QModelIndex (),
  "@qt\n@brief Binding of QModelIndex");


GSI_QTCORE_PUBLIC gsi::Class<QModelIndex> &qtdecl_QModelIndex () { return decl_QModelIndex; }

}

